Creating pyproject.toml and .pre-commit-config.yaml#86
Creating pyproject.toml and .pre-commit-config.yaml#86NSoiffer merged 4 commits intoTalkingCatSW:mainfrom
Conversation
This PR includes the following changes: The files .pre-commit-config.yaml and pyproject.toml were added. The structure of these files is kept close to that found in the corresponding files from the main NVDA repository, with some configurations removed that are not applicable to this repository. The JSON configuration file for pyright was removed, since pyright configuration is now being handled by pyproject.toml. The option reportMissingImports was temporarily set to false, since it was triggering pyright errors. Some unnecessary noqa comments were removed, and one was added to suppress a pyright error caused by the scriptHandler.script decorator. Whitespace was removed from the ends of lines, CRLF was converted to LF, and other minor formatting changes were carried out by running ruff-format. Note: To run the pre-commit checks, install pyright, ruff, and pre-commit in a virtual environment first.
|
I use vscode and there is a Can you add/change the appropriate settings in |
|
I'll ask @RyanMcCleary to update |
Does this mean I don't need to do anything for pre-commit or that I should create a requirements.txt file move the dependencies there along with adding something for pre-commit? Until just now, I wasn't aware of this file but it is certainly something that is useful. For pre-commit, it looks there needs to be a |
|
@NSoiffer - you need to install and set up pre-commit locally. NVDA uses |
This commit contains the following changes Removed the lint action, since we are now using pre-commit. Added trailing newlines to some files which did not previously have them. Updated the zip Cargo dependency to 3.0.0 as the 2.x releases have been yanked Added rust files to pre-commit whitespace fixing
|
Thanks for all your help. I think I told Sean a while back that python is far from my "first" language and so my build environment was rather ad-hoc. |
We encourage merging this upstream to prevent merge conflicts with our fork.
Please also consider setting up pre-commit CI for this repo to ensure any changes on this fork conform to our linting standards.
I would also suggest setting up pyright, ruff, and pre-commit in your local dev environment
This PR includes the following changes from nvaccess#2:
Further changes from nvaccess#3: